<?php

class Light_View_Helper_Redirect extends Light_View_Helper_Abstract
{
    public function redirect(array $params = array(), $routeName = null, $resetParams = false)
    {
        $r = $this->view->getController()->getRouter();

        $url = $r->assemble($params, $routeName, $resetParams);

        header('Location: ' . $url);

        exit(0);
    }
}